//
//  UILabel+Extensions.swift
//  WeiboSwift
//
//  Created by hfwd on 2017/5/17.
//  Copyright © 2017年 hfwd. All rights reserved.
//

import Foundation

extension UILabel {
    
    /// 创建Label
    ///
    /// - Parameters:
    ///   - title: title
    ///   - fontSize: fontSize
    ///   - bgColor: bgColor
    /// - Returns: UILabel()
    func createLabel(title: String, fontSize:CGFloat, textColor:UIColor) -> UILabel {
        
        let label = UILabel()
        
        label.text = title
        
        label.textColor = textColor
        
        label.font = UIFont.systemFont(ofSize: fontSize)
        
        label.numberOfLines = 0
        
        label.sizeToFit()
        
        return label
    }
}
